#ifndef _C_SERV_H_
#define _C_SERV_H_

#include "CMySkt.h"
#include "IProtocol.h"

#include <iostream>

class CServ
{
private:
	SOCKET mSockt;
public:

	CServ();
	~CServ();
	VOID Work(u_short port);
	VOID DealNewCon(SOCKET socket);
	BOOL VerifyProtocol(SOCKET socket);
	BOOL SendHandle(SOCKET socket);
	BOOL Authentication(SOCKET socket);
	BOOL CompareUserInfoWithMySql(char* username, char* pwd, char* vmac);
	BOOL GetLogInfo(VOID *data, OUT void *&username, OUT UINT &uerlen, OUT void *&pwd, OUT UINT &pwdlen, OUT void *&vmac, UINT &maclen);
	BOOL LogOff();
	
	
};

#endif // !_C_SERV_H_

